package com.itheima.继承_练习;

public class Father {
    String name;
    int age;


    public void eat(){
        System.out.println("吃饭");
    }
    public void sleep(){
        System.out.println("睡觉");
    }
}


    class Demo1{
        public static void main(String[] args) {
            Son1 s1 = new Son1();
            s1.eat();
            s1.code();

            Son2 s2 = new Son2();
            s2.sleep();
            s2.play();
        }
    }